#include "Stdafx.h"

list<Command*> commands;
void start();
void end();
int main() {
	BitPacker *packer = new BitPacker();
	
	commands.push_back(new MoveCommand(2,3,4));
	commands.push_back(new ViewCommand(2,3,5.2f));
	
	start();
	
	packer->addCommands(commands);
	delete packer;
	commands.clear();
	
	BitPacker *reader = new BitPacker("replay.bin");
	reader->getCommands(&commands);
	
	
	
	
	end();
	
	// stuff
	cout << "\n";
	system("pause");
}

void start() {
	list<Command*>::iterator it;
	for (it = commands.begin() ; it != commands.end() ; it++) {
		cout << "Start: " << (*it)->toString() << "\n";
	}
	cout << "\n";
}

void end() {
	list<Command*>::iterator it;
	for (it = commands.begin() ; it != commands.end() ; it++) {
		cout << "Enddd: " << (*it)->toString() << "\n";
	}	
}